package com.sw.service;

import com.github.pagehelper.PageInfo;
import com.sw.domain.ActiveEnrollListPage;
import com.sw.model.ActiveEnroll;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by Administrator on 2017/8/5.
 */
@Service
public class ActiveEnrollService {
    public ActiveEnrollListPage setActiveEnrollListPage(List<ActiveEnroll> activeEnrollList){
        ActiveEnrollListPage activeEnrollListPage=new ActiveEnrollListPage();
        activeEnrollListPage.setActiveEnrollList(activeEnrollList);
        PageInfo<ActiveEnroll> pageInfo=new PageInfo<ActiveEnroll>(activeEnrollList);
        activeEnrollListPage.setPageCount(pageInfo.getPages());
        return activeEnrollListPage;
    }
}
